print("timer examples 1:periodic and cancel");
function timer(e,f){
  print(e,f);
  if(f==5){
    print("timer test 5");
    print(timer.isActive($h)); 
    print(timer.getTick($h)); 
    timer.cancel($h);
    print(timer.isActive($h)); 
  }
}

h = timer.periodic(timer,0,0,1);
print(h); 
print(timer.isActive(h)); 
print(timer.getTick(h)); 